<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="cn.edu.thsis.pojo.student"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="cn.edu.thsis.dao.impl.jdbcUtils"%>
<%@page import="java.sql.Connection"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生管理</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/animate.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/font-awesome.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>学生列表</h5>
            </div>
            <div class="ibox-content">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>学号</th>
                        <th>姓名</th>
                        <th>专业</th>
                        <th>联系方式</th>
                        <th>邮箱</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <%
                    List<student> students = (ArrayList<student>)request.getAttribute("stud");
                    for(student stu:students){
                    %>
                    <tr>
                        <td><%=stu.getUid()%></td>
                        <td><%=stu.getUname()%></td>
                        <td><%=stu.getMajor()%></td>
                        <td><%=stu.getStu_tel()%></td>
                        <td><%=stu.getStu_email()%></td>
                        <td><a type="button" class="btn btn-primary" href="${pageContext.request.contextPath}/TeaSvlt?oper=ok&thsis_id=<%=request.getAttribute("thsis_id")%>&stu_id=<%=stu.getUid()%>">接受</a>&nbsp&nbsp&nbsp&nbsp
                        <a type="button" class="btn btn-danger" href="${pageContext.request.contextPath}/TeaSvlt?oper=no&thsis_id=<%=request.getAttribute("thsis_id")%>&stu_id=<%=stu.getUid()%>">拒绝</a>
                        </td>
                    </tr>
                    <%} %>
                    </tbody>
                </table>
            </div>
            </div>
        </div>
    </div>
<script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/js/content.js"></script>
</body>
</html>